package com.dropdb.demo.controller.wx;

import com.dropdb.demo.bean.Region;
import com.dropdb.demo.bean.vo.BaseRespVO;
import com.dropdb.demo.service.WxRegionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author:cheyanjun
 * @date:2020/07/01 04:05
 */
@RestController
@RequestMapping("wx/region")
public class WxRegionController {

    @Autowired
    WxRegionService wxRegionService;

    @GetMapping("list")
    public BaseRespVO getRegionList(Integer pid) {
        List<Region> data = wxRegionService.getRegionList(pid);
        return BaseRespVO.ok(data);
    }
}